#include<stdio.h>
int main()
{
int N,i,item,n1=1,n2=1;
  scanf("%d",&N);
if(N==1||N==2)
item = 1;
for(i<3;i<=N;i++)
{
   item=n1+n2;
    n2=n1;
    n1=item;




}
printf("%d",item);
return 0;
}
